package com.blb.mvc.controller;

import com.blb.mvc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author lvtian
 * @date 2022/12/29 9:26
 */
@Controller
public class HelloController {

    //去index页面 url
    @RequestMapping("hello")
    public ModelAndView toIndex(){
        System.out.println("goto index");
        //返回逻辑视图名称  找到页面
        return new ModelAndView("index");
    }

}
